// 查询列表接口
const getCategoryPage = (params) => {
  return $axios({
    url: '/goods/page',
    method: 'get',
    params
  })
}

// 修改接口
const editDish = (params) => {
  return $axios({
    url: '/goods',
    method: 'put',
    data: { ...params }
  })
}

// 新增接口
const addDish = (params) => {
  return $axios({
    url: '/goods',
    method: 'post',
    data: { ...params }
  })
}

// 查询详情
const queryDishById = (id) => {
  return $axios({
    url: `/goods/${id}`,
    method: 'get'
  })
}

// 删除当前列的接口
const deleteDish = (ids) => {
  return $axios({
    url: '/goods',
    method: 'delete',
    params: { ids }
  })
}

// 启用停用---批量启用停用接口
const dishStatusByStatus = (params) => {
  return $axios({
    url: `/goods/status/${params.status}`,
    method: 'post',
    params: { ids: params.id }
  })
}

// 提交---未提交接口
const dishStatusByStatus2 = (params) => {
  return $axios({
    url: `/goods/status/${params.status}`,
    method: 'get',
    params: { ids: params.id }
  })
}

// 上架---下架接口
const dishStatusByStatus3 = (params) => {
  return $axios({
    url: `/goods/status/${params.status}`,
    method: 'put',
    params: { ids: params.id }
  })
}

